Skip to content

Conversation

@sudo87
Copy link
Collaborator

@sudo87 sudo87 commented Oct 3, 2025

Description

This PR fixes #11502

  1. Prevent service offering update to specific domains if any instance for the offering are outside of those
  2. Removal of offerings is skipped if it is in use by any Instance.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Screenshot 2025-11-06 at 12 10 38 PM

How Has This Been Tested?

  1. Create a compute offering L1 at Root Domain
  2. Create a domain d1
  3. Create an instance vm1 with L1 at root domain level
  4. Try updating service offering domain to d1, shouldn't be allowed
  5. Destroy instance vm1
  6. Update of domain d1 for service offering works

How did you try to break this feature and the system with this change?

@codecov
Copy link

codecov bot commented Oct 3, 2025

Codecov Report

❌ Patch coverage is 8.51064% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 16.18%. Comparing base (d53b6db) to head (a487eba).

Files with missing lines Patch % Lines
.../main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java 0.00% 26 Missing ⚠️
...rc/main/java/com/cloud/user/DomainManagerImpl.java 0.00% 8 Missing ⚠️
...main/java/com/cloud/storage/dao/VolumeDaoImpl.java 40.00% 6 Missing ⚠️
.../cloud/configuration/ConfigurationManagerImpl.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #11780      +/-   ##
============================================
- Coverage     16.19%   16.18%   -0.01%     
  Complexity    13306    13306              
============================================
  Files          5657     5657              
  Lines        498467   498510      +43     
  Branches      60491    60492       +1     
============================================
+ Hits          80702    80707       +5     
- Misses       408783   408823      +40     
+ Partials       8982     8980       -2     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.04% <8.51%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sudo87 idea seems correct, implementation not

@sudo87 sudo87 marked this pull request as draft October 3, 2025 08:52
@sudo87 sudo87 marked this pull request as ready for review October 6, 2025 12:13
@sudo87
Copy link
Collaborator Author

sudo87 commented Oct 6, 2025

@blueorangutan package

@blueorangutan
Copy link

@sudo87 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15304

@DaanHoogland DaanHoogland linked an issue Oct 31, 2025 that may be closed by this pull request
@DaanHoogland DaanHoogland requested a review from shwstppr October 31, 2025 19:28
@DaanHoogland DaanHoogland reopened this Oct 31, 2025
@sudo87 sudo87 requested a review from DaanHoogland November 4, 2025 05:07
@sudo87
Copy link
Collaborator Author

sudo87 commented Nov 4, 2025

@blueorangutan package

@blueorangutan
Copy link

@sudo87 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15628

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm, some overly complexity remains in the removeXxxOffering methods in DomainManagerImpl that might not be needed. whitebox testing advised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing compute offering with related domain.

4 participants